package s0075;

public class SortTest {
    public static void main(String[] args) {

        int[] arr1 = {1,2,1,2,1,2,1,0,1,1,0,2,0,2,2,1,1,1};
        Solution.function(arr1);
        System.out.println(equals(arr1));

        int[] arr2 = {1,1,2,1,2,0,0,2,1,2,1,0,0,0,2,2,1,1,1};
        Solution.function(arr2);
        System.out.println(equals(arr2));

        int[] arr3 = {1,2,1,2,1,0,0,1,2,1,1,2,0,0,2,2,0,0,1,1,1};
        Solution.function(arr3);
        System.out.println(equals(arr2));
        
    }
    public static boolean equals(int[] arr){
        for (int i=0;i<arr.length-1;i++) {
            if (arr[i]>arr[i+1]) {
                return false;
            }
        }
        return true;
    }

}
